home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / mac / Chapter Tutorials / CaseStudies / ch12.ISN / input.dir / 00061.ls < prev    next >
Encoding:
Text File  |  1996-12-04  |  953 b   |  26 lines

  1. global gBlinkOffset, gNumCharsToBlink, gBlinkFlag, gStopFlag, gSelList, gStopPoint, gStopOffset
  2.  
  3. on mouseUp
  4.   if not gStopFlag then
  5.     alert("Please make a Hold Text seletion first!")
  6.   else
  7.     if the selection = EMPTY then
  8.       alert("Please make a selection in the Message field!")
  9.     else
  10.       if (the selStart < getAt(gSelList, 1)) or (the selEnd > getAt(gSelList, 2)) then
  11.         alert("The blinking selection must be within the Hold selection!")
  12.       else
  13.         set howManyChars to the selEnd - the selStart
  14.         if howManyChars > 36 then
  15.           alert("Please make a selection of 36 characters or less!")
  16.         else
  17.           set gBlinkOffset to gStopOffset + (the selStart - getAt(gSelList, 1))
  18.           set gNumCharsToBlink to howManyChars
  19.           set the textStyle of char the selStart + 1 to the selEnd of member "Message" to "bold, italic"
  20.           set gBlinkFlag to 1
  21.         end if
  22.       end if
  23.     end if
  24.   end if
  25. end
  26.